package com.gjw.gulimall.product;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * 注解开启服务注册与发现
 */
@EnableDiscoveryClient
@SpringBootApplication
@Slf4j
public class GulimallProductApplication {

    public static void main(String[] args) {

        log.debug("http://192.168.56.1:8848/nacos/index.html");
        SpringApplication.run(GulimallProductApplication.class, args);
    }


    @RestController
    class EchoController {

        @GetMapping(value = "/echo/{string}")
        public String echo(@PathVariable String string) {
            return string;
        }
    }
}
